/* 笔记管理页面样式 */
.todo-input-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fafafa;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    z-index: 10002;
    width: 90%;
    max-width: 800px;
    height: 85vh;
    display: grid;
    grid-template-rows: auto 1fr;
    animation: fadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* 左侧编辑区域和右侧历史记录的布局 */
.todo-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    height: 100%;
    overflow: hidden;
}

/* 头部样式 */
.todo-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    user-select: none;
}

.todo-header h2 {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

/* 待办输入区域样式 */
.todo-input-section {
    padding: 24px;
    background: #fff;
    display: flex;
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 2;
}

/* 笔记输入区域样式 */
.todo-input-section.note-section {
    padding: 24px;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: #fff;
    box-sizing: border-box;
}

/* 通用输入框样式 */
.todo-input {
    flex: 1;
    height: 40px;
    padding: 0 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: all 0.2s ease;
    background: #fff;
}

/* 笔记输入框特殊样式 */
.todo-input.note-textarea {
    height: auto;
    width: 100%;
    padding: 16px;
    border-radius: 12px;
    font-size: 15px;
    outline: none;
    resize: none;
    margin-bottom: 16px;
    line-height: 1.6;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #fafafa;
    transition: all 0.2s ease;
    box-sizing: border-box;
    min-height: 120px;
}

.todo-input:focus,
.todo-input.note-textarea:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    background: #fff;
}

.todo-button-container {
    display: flex;
    gap: 8px;
}

.todo-button {
    height: 40px;
    padding: 0 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.todo-button.save {
    background: #4CAF50;
    color: white;
}

.todo-button.save:hover {
    background: #45a049;
    transform: translateY(-1px);
}

.todo-button.cancel {
    background: #f0f0f0;
    color: #666;
}

.todo-button.cancel:hover {
    background: #e8e8e8;
    transform: translateY(-1px);
}

/* 历史记录区域样式 */
.todo-history-section {
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
    box-sizing: border-box;
}

.todo-history-title {
    padding: 20px 24px;
    margin: 0;
    font-size: 16px;
    color: #666;
    font-weight: 500;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.todo-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #fff;
}

.todo-history-list::-webkit-scrollbar {
    width: 6px;
}

.todo-history-list::-webkit-scrollbar-track {
    background: transparent;
}

.todo-history-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.todo-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    transition: all 0.2s ease;
    position: relative;
    margin-bottom: 12px;
}

.todo-item:hover {
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.todo-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.todo-item-text {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    white-space: pre-wrap;
}

.todo-item.completed .todo-item-text {
    color: #888;
}

.todo-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: #999;
}

.todo-item-meta span {
    display: inline-flex;
    align-items: center;
    color: #999;
    white-space: nowrap;
}

.todo-item-delete {
    position: absolute;
    right: 12px;
    top: 12px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.2s ease;
}

.todo-item:hover .todo-item-delete {
    opacity: 1;
}

.todo-item-delete:hover {
    background: rgba(255, 68, 68, 0.1);
    color: #ff4444;
}

/* 新建待办项样式 */
.todo-item.new {
    animation: slideIn 0.3s ease-out;
}

/* 已完成待办项样式 */
.todo-item.completed {
    background: #f8f9fa;
    border-color: rgba(0, 0, 0, 0.05);
}

/* 删除动画 */
.todo-item.deleting {
    animation: fadeOut 0.3s ease-out forwards;
}

/* 待办项内容 */
.todo-content {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    transition: all 0.2s ease;
    white-space: pre-wrap;
}

.todo-item.completed .todo-content {
    color: #888;
}

.todo-item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #999;
}

.todo-item-meta a {
    color: #4CAF50;
    text-decoration: none;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.todo-item-meta a:hover {
    text-decoration: underline;
}

.todo-item-delete {
    opacity: 0;
    position: absolute;
    right: 12px;
    top: 12px;
    background: none;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1;
}

.todo-item:hover .todo-item-delete {
    opacity: 1;
}

.todo-item-delete:hover {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.08);
}

/* 遮罩层 */
.todo-input-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(2px);
    z-index: -1;
}

/* 确保所有元素使用 border-box */
.todo-input-container *,
.todo-input-container *::before,
.todo-input-container *::after {
    box-sizing: border-box;
}

.todo-close-button {
    background: none;
    border: none;
    color: #999;
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    line-height: 1;
    margin: -4px -8px -4px 0;
}

.todo-close-button:hover {
    color: #666;
    background: rgba(0, 0, 0, 0.05);
}

/* 笔记分组样式 */
.todo-group {
    margin-bottom: 24px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.todo-group-header {
    padding: 16px 20px;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.todo-group-title {
    color: #333;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 12px;
}

.todo-group-title:hover {
    color: #4CAF50;
}

.todo-group-count {
    color: #999;
    font-size: 12px;
    white-space: nowrap;
}

.todo-group-notes {
    padding: 16px;
}

.todo-group-notes .todo-item {
    background: #fff;
    margin-bottom: 8px;
}

.todo-group-notes .todo-item:last-child {
    margin-bottom: 0;
}

/* 待办列表区域样式 */
.todo-list-section {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
    height: calc(85vh - 140px);
    /* 减去头部和输入区域的高度 */
}

.todo-lists-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 24px;
    height: 100%;
    background: #fff;
}

.todo-list-wrapper {
    display: flex;
    flex-direction: column;
    background: #fff;
    height: 100%;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.todo-list-wrapper:hover {
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.todo-list-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    padding: 16px 20px;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 2px solid;
    letter-spacing: 0.5px;
}

.todo-list-title.active {
    color: #666;
    border-color: #e0e0e0;
    background: rgba(0, 0, 0, 0.02);
}

.todo-list-title.completed {
    color: #4CAF50;
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.04);
}

.todo-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    overflow-y: auto;
    height: 100%;
    background: inherit;
}

.todo-list::-webkit-scrollbar {
    width: 6px;
}

.todo-list::-webkit-scrollbar-track {
    background: transparent;
}

.todo-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

/* 待办项样式 */
.todo-item {
    display: flex;
    align-items: center;
    padding: 4px 16px;
    gap: 12px;
    padding: 12px 16px;
    background: #fafafa;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
    border-bottom: 1px solid #eee;
}

.todo-item:hover {
    border-color: rgba(0, 0, 0, 0.1);
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transform: translateY(-1px);
}

/* 新建待办项样式 */
.todo-item.new {
    background: #f8fdf8;
    border-color: rgba(76, 175, 80, 0.2);
    animation: slideDown 0.2s ease-out;
}

/* 待办项内容 */
.todo-content {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    transition: all 0.2s ease;
    white-space: pre-wrap;
}

.todo-item.completed .todo-content {
    color: #888;
}

/* 复选框样式 */
.todo-checkbox {
    width: 18px;
    height: 18px;
    margin: 0 8px;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 4px;
    position: relative;
    appearance: none;
    border: 2px solid #ddd;
    transition: all 0.2s ease;
    background: #fff;
}

.todo-checkbox:checked {
    background: #4CAF50;
    border-color: #4CAF50;
}

.todo-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
}

.todo-checkbox:hover {
    border-color: #4CAF50;
}

/* 选择框样式 */
.todo-selection-checkbox {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 4px;
    position: relative;
    appearance: none;
    border: 2px solid #ddd;
    transition: all 0.2s ease;
    background: #fff;
}

.todo-selection-checkbox:checked {
    background: #4CAF50;
    border-color: #4CAF50;
}

.todo-selection-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
}

.todo-selection-checkbox:hover {
    border-color: #4CAF50;
}

/* 删除按钮样式 */
.todo-delete-button {
    opacity: 0;
    background: none;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1;
}

.todo-item:hover .todo-delete-button {
    opacity: 1;
}

.todo-delete-button:hover {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.08);
}

/* 空状态提示样式 */
.todo-empty {
    text-align: center;
    padding: 32px 0;
    color: #999;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.01);
    border-radius: 8px;
    margin: 0 12px;
}

/* 生成总结按钮容器 */
.todo-summary-container {
    margin-top: 16px;
    padding: 0 16px;
    text-align: center;
}

/* 左侧便签列表容器 */
.left-todo-container {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    max-height: 80vh;
    background: rgba(255, 255, 245, 0.4);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    z-index: 99999;
    padding: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    pointer-events: auto;
    margin-top: 36px;
}

.left-todo-container.active {
    background: rgba(255, 255, 245, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 100000;
}

.left-todo-header {
    font-size: 16px;
    font-weight: 500;
    color: rgba(102, 102, 102, 0.4);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    user-select: none;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.left-todo-container.active .left-todo-header {
    color: #333;
    font-weight: 600;
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

.left-todo-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.2s ease;
    border-left: 3px solid #FFD700;
    position: relative;
}

.left-todo-container.active .left-todo-item {
    background: rgba(255, 255, 255, 0.9);
}

.left-todo-item:hover {
    background: rgba(255, 255, 255, 1) !important;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.left-todo-text {
    font-size: 14px;
    color: #666;
    word-break: break-word;
    overflow-wrap: break-word;
    transition: color 0.3s ease;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.left-todo-container.active .left-todo-text {
    color: #333;
}

.left-todo-item .todo-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.left-todo-item:hover .todo-actions {
    opacity: 1;
}

.left-todo-item .todo-action-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    border-radius: 4px;
    line-height: 1;
}

.left-todo-item .todo-action-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.left-todo-item .todo-copy-btn {
    color: #2196F3;
    font-size: 16px;
}

.left-todo-item .todo-copy-btn:hover {
    color: #1976D2;
}

.left-todo-item .todo-delete-btn {
    color: #ff4444;
    font-size: 24px;
}

.left-todo-item .todo-delete-btn:hover {
    color: #cc0000;
}

.left-todo-item .todo-item-meta {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.left-todo-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: calc(80vh - 50px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    margin-right: -4px;
}

.left-todo-list::-webkit-scrollbar {
    width: 4px;
}

.left-todo-list::-webkit-scrollbar-track {
    background: transparent;
}

.left-todo-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
}

.todo-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    border: 1px dashed rgba(0, 0, 0, 0.1);
    margin: 20px;
}

/* 待办事项选择框样式 */
.todo-selection-checkbox {
    margin-right: 8px;
    cursor: pointer;
}

/* 总结按钮容器样式 */
.todo-summary-container {
    margin-top: 16px;
    padding: 0 16px;
    text-align: center;
}

.todo-content {
    flex: 1;
    margin-right: 8px;
}

/* 待办事项卡片的操作按钮容器 */
.todo-list .todo-actions {
    position: absolute;
    top: 4px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
    height: 20px;
    line-height: 20px;
}

.todo-list .todo-item:hover .todo-actions {
    opacity: 1;
}

/* 待办事项卡片的操作按钮通用样式 */
.todo-list .todo-action-btn {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #999;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.todo-list .todo-action-btn:hover {
    transform: scale(1.1);
}

/* 完成按钮 */
.todo-list .todo-complete-btn {
    color: #4CAF50;
}

.todo-list .todo-complete-btn:hover {
    color: #45a049;
}

/* 复制按钮 */
.todo-list .todo-copy-btn {
    color: #2196F3;
}

.todo-list .todo-copy-btn:hover {
    color: #1976D2;
}

/* 删除按钮 */
.todo-list .todo-delete-btn {
    color: #ff4444;
}

.todo-list .todo-delete-btn:hover {
    color: #cc0000;
}

/* 调整待办事项卡片内容区域的边距 */
.todo-list .todo-item-content {
    flex: 1;
    padding-top: 4px;
    padding-bottom: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* 确保其他功能的卡片样式不受影响 */
.todo-history-list .todo-item-content,
.todo-group-notes .todo-item-content {
    padding-right: initial;
}

.todo-history-list .todo-item-delete,
.todo-group-notes .todo-item-delete {
    position: absolute;
    right: 12px;
    top: 12px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.2s ease;
}

.todo-history-list .todo-item:hover .todo-item-delete,
.todo-group-notes .todo-item:hover .todo-item-delete {
    opacity: 1;
}

.todo-history-list .todo-item-delete:hover,
.todo-group-notes .todo-item-delete:hover {
    background: rgba(255, 68, 68, 0.1);
    color: #ff4444;
}

/* 顶部待办滚动条样式 */
.todo-scrollbar-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 8px 40px 8px 16px; /* 右侧padding调整为40px，为关闭按钮预留空间 */
}

.todo-scrollbar-content {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0;
    white-space: nowrap;
    width: calc(100% - 40px); /* 内容区域宽度减去关闭按钮区域 */
    justify-content: flex-start;
}

.todo-scrollbar-content.scrolling {
    animation: scrollTodo 30s linear infinite;
}

.todo-scrollbar-content.static {
    justify-content: flex-start;
    animation: none;
}

.todo-scrollbar-item {
    display: inline-flex;
    align-items: center;
    margin-right: 20px;
    color: #666;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    animation-fill-mode: forwards;
}

.todo-scrollbar-item:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.todo-scrollbar-item:last-child {
    margin-right: 0;
}

.todo-scrollbar-actions {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    gap: 2px;
    background: rgba(0, 0, 0, 0.02);
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.todo-scrollbar-item:hover .todo-scrollbar-actions {
    background: rgba(0, 0, 0, 0.04);
    border-right-color: rgba(0, 0, 0, 0.08);
}

.todo-scrollbar-btn {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #999;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    border-radius: 3px;
    line-height: 1;
}

.todo-scrollbar-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    transform: scale(1.1);
}

.todo-scrollbar-btn.copy {
    color: #2196F3;
}

.todo-scrollbar-btn.copy:hover {
    color: #1976D2;
    background: rgba(33, 150, 243, 0.1);
}

.todo-scrollbar-btn.complete {
    color: #4CAF50;
    font-size: 16px;
}

.todo-scrollbar-btn.complete:hover {
    color: #45a049;
    background: rgba(76, 175, 80, 0.1);
}

.todo-scrollbar-item>span:last-child {
    padding: 4px 8px;
    transition: all 0.3s ease;
}

.todo-scrollbar-item:hover>span:last-child {
    color: #333;
}

/* 滚动动画 */
@keyframes scrollTodo {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* 当鼠标悬停时暂停滚动 */
.todo-scrollbar-container:hover .todo-scrollbar-content.scrolling {
    animation-play-state: paused;
}

/* 调整其他固定元素的位置以适应顶部滚动条 */
.floating-buttons-container {
    margin-top: 36px;
}

.left-note-container {
    margin-top: 36px;
}

/* 显示已完成按钮激活状态 */
.completed-list:not(.hidden)~.todo-header .toggle-completed-button {
    background: #4CAF50;
    color: white;
}

.completed-list:not(.hidden)~.todo-header .toggle-completed-button::before {
    opacity: 1;
}

/* 新增待办按钮 */
.add-todo-button {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 2px dashed #4CAF50;
    border-radius: 8px;
    background: white;
    color: #4CAF50;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-todo-button:hover {
    background: #f0f9f0;
    transform: translateY(-1px);
}

/* 待办列表 */
.todo-cards-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.todo-cards-list.completed-list {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

.todo-cards-list.completed-list.hidden {
    display: none;
}

.completed-list-title {
    grid-column: 1 / -1;
    margin: 0 0 16px;
    color: #666;
    font-size: 14px;
    font-weight: normal;
}

/* 待办卡片 */
.todo-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 150px;
}

.todo-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* 新建待办卡片 */
.todo-card.new {
    border: 1px solid #4CAF50;
    animation: slideDown 0.3s ease-out;
}

/* 已完成的待办卡片 */
.todo-card.completed {
    opacity: 0.8;
}

.todo-card.completed .todo-card-content {
    color: #999;
}

/* 待办输入框 */
.todo-card-input {
    width: 100%;
    flex: 1;
    min-height: 100px;
    padding: 16px;
    border: none;
    font-size: 14px;
    line-height: 1.6;
    font-family: inherit;
    outline: none;
    resize: none;
    white-space: pre-wrap;
}

/* 待办内容 */
.todo-card-content {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    padding: 16px;
    word-break: break-word;
    white-space: pre-wrap;
}

/* 待办元信息 */
.todo-card-meta {
    font-size: 12px;
    color: #999;
    padding: 0 16px 16px;
}

/* 待办操作按钮 */
.todo-card-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: white;
    border-top: 1px solid #eee;
    margin-top: auto;
}

.todo-card-save,
.todo-card-cancel {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.todo-card-save {
    background: #4CAF50;
    color: white;
}

.todo-card-save:hover {
    background: #45a049;
}

.todo-card-cancel {
    background: #f0f0f0;
    color: #666;
}

.todo-card-cancel:hover {
    background: #e8e8e8;
}

/* 已保存待办的操作按钮 */
.todo-card.saved .todo-card-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 0;
    background: transparent;
    border: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.todo-card:hover .todo-card-actions {
    opacity: 1;
}

.todo-card-complete,
.todo-card-copy,
.todo-card-edit,
.todo-card-delete {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #666;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.todo-card-complete:hover {
    background: #f0f9f0;
    color: #4CAF50;
}

.todo-card-copy:hover {
    background: #f0f8ff;
    color: #2196F3;
}

.todo-card-edit:hover {
    background: #f0f8ff;
    color: #FFA500;
}

.todo-card-delete:hover {
    background: #fff0f0;
    color: #ff4444;
}

/* 空状态和错误状态 */
.todo-cards-empty,
.todo-cards-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 14px;
    background: white;
    border-radius: 8px;
    border: 1px dashed rgba(0, 0, 0, 0.1);
}

.todo-cards-error {
    color: #ff4444;
    border-color: rgba(255, 68, 68, 0.2);
}

/* 移动和删除动画 */
.todo-card.moving {
    animation: fadeOut 0.3s ease-out forwards;
}

.todo-card.deleting {
    animation: fadeOut 0.3s ease-out forwards;
}

/* 显示已完成按钮激活状态 */
.todo-header .toggle-completed-button.active {
    background: #4CAF50;
    color: white;
}

.todo-header .toggle-completed-button.active::before {
    opacity: 1;
}

/* 编辑状态的卡片样式 */
.todo-card.editing {
    border-color: #FFA500;
    box-shadow: 0 0 0 2px rgba(255, 165, 0, 0.1);
}

/* 编辑状态的输入框 */
.todo-card.editing .todo-card-content {
    display: none;
}

.todo-edit-input {
    width: 100%;
    flex: 1;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
    font-family: inherit;
    resize: vertical;
    outline: none;
    background: #fff;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    white-space: pre-wrap;
}

.todo-edit-input:focus {
    border-color: #FFA500;
    box-shadow: 0 0 0 2px rgba(255, 165, 0, 0.1);
}

/* 编辑操作按钮容器 */
.todo-edit-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: white;
    border-top: 1px solid #eee;
    margin-top: auto;
}

.todo-edit-save,
.todo-edit-cancel {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.todo-edit-save {
    background: #4CAF50;
    color: white;
}

.todo-edit-save:hover {
    background: #45a049;
}

.todo-edit-cancel {
    background: #f0f0f0;
    color: #666;
}

.todo-edit-cancel:hover {
    background: #e8e8e8;
}

/* 待办事项卡片容器 */
.todo-cards-container {
    width: 90%;
    max-width: 800px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.todo-cards-wrapper {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #fafafa;
}

/* 待办事项头部 */
.todo-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Add close button styles */
.todo-scrollbar-close {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: #ff4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    transition: all 0.2s ease;
    z-index: 2;
}

.todo-scrollbar-close:hover {
    background: #ff6666;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 2px 4px rgba(255, 68, 68, 0.2);
}

/* 添加右侧分隔线 */
.todo-scrollbar-content::after {
    content: '';
    position: absolute;
    right: 40px; /* 与关闭按钮区域对齐 */
    top: 4px;
    bottom: 4px;
    width: 1px;
    background: rgba(0, 0, 0, 0.06);
}

.todo-selection-checkbox {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.todo-selection-checkbox:hover {
    opacity: 1;
}

.todo-summary-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
}

.generate-summary-button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.generate-summary-button:hover {
    background-color: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.generate-summary-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.todo-card.completed {
    position: relative;
    padding-right: 40px;
}